const { defineConfig } = require('@vue/cli-service')
const path = require('path')
module.exports = defineConfig({
  transpileDependencies: true,
  devServer: {
    host: 'localhost',
    port: 9999,
    open: true,
    proxy: {
      '/api': {
        target: 'https://console-mock.apipost.cn/app/mock/project/b86b51b5-690a-4903-94a8-15a40484f828',
        changeOrigin: true,
        pathRewrite: {
          '^/api': '/api'
        }
      }
    }
  },
  lintOnSave: false,
  chainWebpack: config => {
    config.resolve.alias
      .set('@',path.join(__dirname, 'src'))
      .set('_views',path.join(__dirname, 'src/views'))
      .set('_components',path.join(__dirname, 'src/components'))
      .set('_api',path.join(__dirname, 'src/api'))
      .set('_utils',path.join(__dirname, 'src/utils'))
  }
})
